package com.ruoyi.common.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 短信发送相关配置
 * @author fjhua
 * @create 2021-04-01 9:59
 */
@Component
//@ConfigurationProperties(prefix = "sms")
public class SmsConfig {

    public static boolean enabled;

    public static String uri;

    public static String cpcode;

    public static String user;

    public static String pwd;

    @Value("${sms.enabled}")
    public  void setEnabled(boolean enabled) {
        SmsConfig.enabled = enabled;
    }
    @Value("${sms.uri}")
    public  void setUri(String uri) {
        SmsConfig.uri = uri;
    }
    @Value("${sms.cpcode}")
    public  void setCpcode(String cpcode) {
        SmsConfig.cpcode = cpcode;
    }

    @Value("${sms.user}")
    public  void setUser(String user) {
        SmsConfig.user = user;
    }

    @Value("${sms.pwd}")
    public  void setPwd(String pwd) {
        SmsConfig.pwd = pwd;
    }

}
